import 'package:dio/dio.dart';
import 'package:study_online/global/global.dart';

Future imgUpload(String path, String name) async {
  return await Global.getInstance().dio.post(
        "/stu/upload",
        data: FormData.fromMap({
          "file": await MultipartFile.fromFile(path, filename: name),
        }),
      );
}
Future updateUserInfo(String stuId,String college,String major,String name,String phone,String photo,String qq,String wechat,String sex) async {
  return await Global.getInstance().dio.post(
    "/stu/updateUserInfo",
    queryParameters: {
      "college":college ,
      "major": major,
      "name": name,
      "phone": phone,
      "photo": photo,
      "qq":qq ,
      "stuId":stuId ,
      "wechat":wechat ,
      "sex":sex ,
    },
  );
}

